<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多个div浮动</title>
    <style>
        div {
            width: 100px;
            height: 100px;
        }

        .red {
            background: red;
            float: left;
        }

        .green {
            background: green;
            /* width: 300px;
            height: 300px; */
            float: left;
        }

        .blue {
            background: blue;
            float: left;
        }
    </style>
</head>

<body>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
</body>

</html>